import Vue from 'vue'
import Router from 'vue-router'
// 导入组件
import home from '../components/tabbar/home.vue'

import vip from '../components/tabbar/vip.vue'

import showppingcar from '../components/tabbar/showppingcar.vue'

import search from '../components/tabbar/search.vue'


import newslist from '../components/news/newslist.vue'

import newsinfo from '../components/news/newsinfo.vue'

Vue.use(Router)

export default new Router({
  // 注册路由
  routes: [
    {
      path:'/',
      redirect:'/home'
    },
   {
     path:'/home',
     component: home,
     name:'home'
   },
   {
     path:'/vip',
     component:vip,
     name:'vip'
   },
   {
     path:'/showppingcar',
     component:showppingcar,
     name:'showppingcar'
   },
   {
     path:'/search',
     component:search,
     name:'search'
   },
   {
     path:'/home/newslist',
     component:newslist,
     name:'newslist'
   },
   {
     path:'/home/newsinfo/',
     component:newsinfo,
     name:'newsinfo'
   }
  ],
  linkActiveClass:'mui-active'//覆盖默认的路由高亮的类
})
